<div class="content-wrapper">
    <section class="content-header">
        <?php echo $this->partial('layout/breadcrumb'); ?>

        <h1 class="pull-right" id="dbshop-menu-top">
            <a href="<?php echo $this->url('sales-service', [], ['query' => $this->queryData]);?>" class="btn btn-default btn-sm"><i class="fa fa-arrow-left"></i> <?php echo $this->translate('返回列表'); ?></a>
            <?php echo $this->HelpUrl('salesService'); ?>
        </h1>
    </section>

    <section class="content">

        <div class="row">
            <div class="col-md-12">
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?php echo $this->translate('售后详情'); ?></h3>
                    </div>

                    <div class="box-body">
                        <div class="box-body table-responsive no-padding">
                            <table class="table table-bordered table-striped shop-table">
                                <tbody>
                                <tr>
                                    <th width="20%" class="text-right"><?php echo $this->translate('订单编号'); ?>：</th>
                                    <td><?php echo $this->returnInfo->getOrderSn(); ?></td>
                                </tr>
                                <tr>
                                    <th class="text-right"><?php echo $this->translate('商品名称'); ?>：</th>
                                    <td>
                                        <img src="<?php echo $this->goodsHelper()->goodsImage($this->orderGoodsInfo[0]->getGoodsImage()); ?>" class="img-thumbnail" style="width: 50px;height: 50px;">
                                        <?php echo $this->orderGoodsInfo[0]->getGoodsName(); ?> <?php if (!empty($this->orderGoodsInfo[0]->getInSpecGoodsStr())) echo '('.$this->orderGoodsInfo[0]->getInSpecGoodsStr().')'; ?></td>
                                </tr>
                                <tr>
                                    <th class="text-right"><?php echo $this->translate('购物金额'); ?>：</th>
                                    <td><?php echo $this->orderGoodsInfo[0]->getGoodsPrice() . ' x ' . $this->orderGoodsInfo[0]->getBuyNum() . ' = ' . $this->orderGoodsInfo[0]->getGoodsAmount() . ' ('.$this->orderGoodsInfo['currencySymbol'].')'; ?></td>
                                </tr>
                                <?php if ($this->returnInfo->getReturnType() != 3) { ?>
                                <tr>
                                    <th class="text-right"><?php echo $this->translate('申请退款金额'); ?>：</th>
                                    <td class="text-red"><?php echo $this->orderGoodsInfo['currencySymbol'] . $this->returnInfo->getReturnAmount(); ?></td>
                                </tr>
                                <?php } ?>
                                <tr>
                                    <th class="text-right"><?php echo $this->translate('申请时间'); ?>：</th>
                                    <td><?php echo $this->shopDateFormat()->orderGoodsReturnTime($this->returnInfo->getAddTime()); ?></td>
                                </tr>
                                <tr>
                                    <th class="text-right"><?php echo $this->translate('售后类型'); ?>：</th>
                                    <td><?php echo $this->salesHelper()->getOrderGoodsReturnType($this->returnInfo->getReturnType()); ?></td>
                                </tr>
                                <tr>
                                    <th class="text-right"><?php echo $this->translate('申请售后原因'); ?>：</th>
                                    <td><?php echo $this->escapeHtml($this->returnInfo->getReturnReason()); ?></td>
                                </tr>
                                <?php if ($this->returnInfo->getReturnType() != 3) { ?>
                                    <tr>
                                        <th class="text-right"><?php echo $this->translate('退款方式'); ?>：</th>
                                        <td>
                                            <?php echo $this->salesHelper()->getOrderGoodsReturnPayType($this->returnInfo->getRefundPayType()); ?>
                                            <?php if ($this->returnInfo->getRefundPayType() == 'otherPay') { ?>
                                                <small class="text-bold text-red">(<?php echo $this->translate('请手动将金额退款至相关账户'); ?>)</small>
                                            <?php } ?>
                                        </td>
                                    </tr>
                                    <?php if ($this->returnInfo->getRefundPayType() == 'otherPay') { ?>
                                        <tr>
                                            <th class="text-right"><?php echo $this->translate('支付名称(开户行)'); ?>：</th>
                                            <td><?php echo $this->escapeHtml($this->returnInfo->getRefundPayName()); ?></td>
                                        </tr>
                                        <tr>
                                            <th class="text-right"><?php echo $this->translate('姓名'); ?>：</th>
                                            <td><?php echo $this->escapeHtml($this->returnInfo->getRefundUser()); ?></td>
                                        </tr>
                                        <tr>
                                            <th class="text-right"><?php echo $this->translate('收款账号(卡号)'); ?>：</th>
                                            <td><?php echo $this->escapeHtml($this->returnInfo->getRefundAccount()); ?></td>
                                        </tr>
                                    <?php } ?>
                                <?php } ?>
                                <tr>
                                    <th class="text-right"><?php echo $this->translate('申请说明'); ?>：</th>
                                    <td><?php echo nl2br($this->escapeHtml($this->returnInfo->getReturnInfo())); ?></td>
                                </tr>
                                <tr>
                                    <th class="text-right"><?php echo $this->translate('审核结果'); ?>：</th>
                                    <td><?php echo $this->salesHelper()->getOrderGoodsReturnState($this->returnInfo->getReturnState()); ?></td>
                                </tr>
                                <tr>
                                    <th class="text-right"><?php echo $this->translate('审核说明'); ?>：</th>
                                    <td><?php echo nl2br($this->escapeHtml($this->returnInfo->getReviewInfo())); ?></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </section>

</div>
